var class_num=location.search;
class_num=class_num.split('?')[1];
$('.class_num').append(class_num);
$('#href_index').attr('href','course.html?'+class_num);
$('#href_message').attr('href','message.html?'+class_num);
$('#me').attr('href','me.html?'+class_num);
if (islogin()) {
    $.post({
        url:'../../requests/student/select_sharedfile.php',
        data:{'class':class_num},
        success:function (data) {
            for (var i = 0; i < data.length; i++) {
                var dom=" <div class='list-block'><ul>\n" +
                    "                   <li class=\"item-content\">\n" +
                    "                       <div class=\"item-inner\">\n" +
                    "                           <div class=\"item-title\">文件名</div>\n" +
                    "                           <div class=\"item-after\">"+data[i].name+"</div>\n" +
                    "                       </div>\n" +
                    "                   </li>\n" +
                    "                   <li class=\"item-content\">\n" +
                    "                    <div class=\"item-inner\"><div class='item-title'>\n" +
                    "                        <div class='item-after'><span><a href='../../"+data[i].path+"'>下载<span class=\"icon icon-download\"></span></a></span></div>\n" +
                    "                    </div>\n" +
                    "                   </li>\n" +
                    "               </ul></div>";
                $('.sharedfile_box').append(dom);
            }
        }
    });

}
else window.location.href='../../index.html';